/*
 *  edge.cpp
 *  
 *
 *  Created by Brian Bilbo on 12/03/09.
 *
 */

#include "edge.h"
#include "node.h"

int Edge::length = 10;

Edge::Edge()
//: node1(0), node2(0), distance(100)
{
	node1 = 0;
	node2 = 0;
	distance = 10;
}
Edge::Edge(Node* node1, Node* node2, int distance)
: node1(node1), node2(node2), distance(distance)
{
  	
}
  
bool Edge::connect(Node* node1, Node* node2)
{
		return (
			(node1 == this->node1 &&
			node2 == this->node2) ||
			(node1 == this->node2 &&
			node2 == this->node1));
}